#define  _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
#include<functional>
using namespace std;

void myprint(int val)
{
	cout << val << " " <<  endl;
	cout << endl;
}

class myprint1
{
public:
	void operator()(int val)
	{
		cout << val << endl;
	}
};

void test01()
{
	vector<int>v1;
	for (int i = 0; i < 10; i++)
	{
		v1.push_back(i);
	}
	myprint1 m1;
	for_each(v1.begin(), v1.end(), myprint);
	for_each(v1.begin(), v1.end(),m1);
}

int main()
{
	test01();
	return 0;
}